
package com.insigma.business.qrcode.intell.dao;

import com.insigma.business.qrcode.intell.dto.CommonQaInfoBSearcher;
import com.insigma.business.qrcode.intell.entity.CommonQaInfoDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface CommonQaInfoDao {

    
    List<CommonQaInfoDO> search(final CommonQaInfoBSearcher innerSearcher);

    
    CommonQaInfoDO get(final String id);

    
    Integer insert(final CommonQaInfoDO commonQaInfoDO);

    
    Integer update(final CommonQaInfoDO commonQaInfoDO);

    
    Integer delete(@Param("id") final String id,
                   @Param("modifierType") final String modifierType,
                   @Param("modifierId") final String modifierId);


    Integer addHelpfulCount(@Param("title") String title, @Param("helpful") Boolean helpful);

    Integer addHelpfulCountById(@Param("id") String id, @Param("helpful") Boolean helpful);

    CommonQaInfoDO getByAreaAndSeq(@Param("adminAreaCode")String adminAreaCode, @Param("seqNo")Integer seqNo);

    void addSeq(@Param("adminAreaCode")String adminAreaCode, @Param("seqNo")Integer seqNo);

    void subtractSeq(@Param("adminAreaCode")String adminAreaCode, @Param("seqNo")Integer seqNo);
}
